;(function () {
    let myChart = echarts.init(document.querySelector(".box-m1"));
    let option = {
        dataset: [
          {
            source: [
              ['Product', 'Sales', 'Price', 'Year'],
              ['旅游', 123, 32, 2011],
              ['游戏', 231, 14, 2011],
              ['代码', 235, 5, 2011],
              ['宅家', 341, 25, 2011],
              ['追剧', 122, 29, 2011],
              ['睡觉', 143, 30, 2012],
              ['网购', 201, 19, 2012],
              ['学习', 255, 7, 2012],
              ['复习', 241, 27, 2012],
              ['巩固', 102, 34, 2012],
              ['过节', 153, 28, 2013],
              
            ]
          },
          {
            transform: {
              type: 'filter',
              config: { dimension: 'Year', value: 2011 }
            }
          },
          {
            transform: {
              type: 'filter',
              config: { dimension: 'Year', value: 2012 }
            }
          },
          {
            transform: {
              type: 'filter',
              config: { dimension: 'Year', value: 2013 }
            }
          }
        ],
        series: [
          {
            type: 'pie',
            radius: 50,
            center: ['50%', '25%'],
            datasetIndex: 1
          },
          {
            type: 'pie',
            radius: 50,
            center: ['50%', '50%'],
            datasetIndex: 2
          },
          {
            type: 'pie',
            radius: 50,
            center: ['50%', '75%'],
            datasetIndex: 3
          }
        ],
        // Optional. Only for responsive layout:
        media: [
          {
            query: { minAspectRatio: 1 },
            option: {
              series: [
                { center: ['25%', '50%'] },
                { center: ['50%', '50%'] },
                { center: ['75%', '50%'] }
              ]
            }
          },
          {
            option: {
              series: [
                { center: ['50%', '25%'] },
                { center: ['50%', '50%'] },
                { center: ['50%', '75%'] }
              ]
            }
          }
        ]
      };
    myChart.setOption(option);
    //缩放改变大小
    window.addEventListener("resize", () => {
      myChart.resize();
    });
  })();
  